<?php $this->load->view('templates/header') ?>
<?php $data['is_admin']=$is_admin; $this->load->view('templates/nav',$data) ?>
<div class="container">
<br>
<br>
<br>
<br>
<div class="row">
    
<?php if ( isset($sidebar_list) ): ?>
<?php $data['sidebar_list']=$sidebar_list;$this->load->view('templates/sidebar',$data); ?>
<?php endif; ?>
<div class="col-md-9 col-lg-9">
    <div class="row">
    <ol class="breadcrumb">
    <li><a href="#">Home</a></li>
    <li class="active" id="configModName">
    <?php if (isset($curmod)): ?>
    <?php echo $curmod; ?>
    <?php endif; ?>
    </li>
    </ol>
    </div>
    <div class="row">
        <div class="col-sm-3 col-md-3">
            <select id="configSelect" style="width:150pt">
            <?php if (isset($config_list) ): ?>
            <?php foreach($config_list as $item): ?>           
            <option><?php echo $item;?></option>
            <?php endforeach; ?>
            <?php endif; ?>
            </select>
        </div>
        <div class="col-sm-3 col-md-3">
            <button class="btn btn-primary" id="btnConfigOpen">查看</button>
            <?php if ($is_admin): ?>
            <button class="btn btn-primary" id="btnConfigAdd">新增</button>
            <button class="btn btn-danger" id="btnConfigDelete">删除</button>
            <?php endif; ?>
        </div>    
    </div>
    <div class="row">    
        <form class="form-horizontal" role="form" action=""  method="">
            <fieldset>
                <div class="form-group">
                    <textarea id="configContent" rows="100" cols="100">
                    <?php if (isset($config_content)): ?>
                    <?php echo $config_content; ?>
                    <?php endif; ?>
                    </textarea>
                </div>
            </fieldset>
        </form>
    </div>
    
    <?php if (isset($error_info) && $error_info): ?>
    <div class="row">
        <div class="col-sm-12 col-md-12">
        <div class="panel panel-primary">
        <div class="panel-heading">
        <h3 class="panel-title">File Upload Result<h3>
        </div>
        <div class="panel-body">
            <h3><?php echo $error_info;?></h3>

        </div>
    </div>
    <?php endif; ?>
</div><!-- End col-md-9 col-lg-9 -->
</div><!-- End row-->
</div><!-- End Container-->
<script src="<?php echo base_url() ?>assets/js/config.js"></script>
<?php $this->load->view('templates/footer') ?>
